package com.example.springboot.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import java.io.Serializable;
import java.time.LocalDateTime;

import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Getter;
import lombok.Setter;

/**
 * <p>
 * 民宿资讯表
 * </p>
 *
 * @author
 *
 */
@Getter
@Setter
@TableName("homestay_news")
@ApiModel(value = "HomestayNews对象", description = "民宿资讯表")
public class HomestayNews implements Serializable {

    private static final long serialVersionUID = 1L;

    @ApiModelProperty("主键ID")
    @TableId(value = "id", type = IdType.AUTO)
    private Integer id;

    @ApiModelProperty("资讯标题")
    private String title;

    @ApiModelProperty("封面图片URL")
    private String img;

    @ApiModelProperty("资讯摘要")
    private String summary;

    @ApiModelProperty("资讯正文内容")
    private String content;

    @ApiModelProperty("浏览量")
    private Integer viewCount;

    @ApiModelProperty("创建时间")
    @JsonFormat(pattern ="yyyy-MM-dd HH:mm:ss")
    private LocalDateTime time;

    @ApiModelProperty("状态：0-未发布，1-已发布")
    private Integer status;


}
